import java.util.ArrayList;
import java.util.Random;


public class cat {
	//variables
	String name;
	String color;
	int age;
	boolean is_alive;
	int length;
	
	//constructor
	public cat() {
		this.name="whiskers";
		this.color="yellow";
		this.age=2;
		this.is_alive=true;
	
	}
	public cat(String name) {
		this.name=name;
		this.color="Black";
		this.age=2;
		this.is_alive=true;
		this.length=10;
	}
	//methods
	//scope.modifier return-type name(param-type, param
	//}
	
	public String toString(){
		String temp= "";
		temp+=name;
		temp+=color;
		temp+=age;
		temp+=is_alive;
		return temp;
	}
	
	public int age() {
		age++;
		return age;
	}
	
	public boolean hitWithTruck() {
		is_alive=false;
		length=2;
		return is_alive;
	}
	public ArrayList<cat> haveBabies() {
		
		Random myGen = new Random();
		int babynum = myGen.nextInt(20);
		ArrayList<cat> temp = new ArrayList<cat>();
		for(int i=0; i<babynum; i++ ) {
			
			temp.add( new cat());
		}
		
		
		return temp;
		
	}
	
}
